home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1993 September / clonecd / September 93.img / Archives / Applications / Graphics / image / Imagic -- The Release / External Functions / Blank XFunction / XFunctions.h < prev    next >
Text File  |  1992-04-02  |  3KB  |  107 lines

  1. /*
  2.  *                    XFunctions.h
  3.  *
  4.  *            Written By: Brian Powell
  5.  *            (c) 1991, All Rights Reserved.
  6.  *
  7.  *        This is the header file for the External Functions.  This contains all of the function
  8.  *        prototypes contained in the external module library.
  9.  *
  10.  */
  11.  
  12. #define EXTERNAL_FUNCTION_LIBRARY_VERSION_NUM    0x00101
  13.  
  14. /* Define messages to and from Imagic. */
  15.  
  16. #define INITIALIZE 0
  17. #define MENU_ITEM  100
  18. #define SHUT_DOWN  200
  19.  
  20. #ifndef TRUE
  21. #define TRUE 1
  22. #endif
  23. #ifndef FALSE
  24. #define FALSE 0
  25. #endif
  26. #ifndef NIL
  27. #define NIL 0L
  28. #endif
  29. /* Type Definitions for any variables we may need. */
  30.  
  31. typedef Handle    ImageHandle, **ImageList;
  32. typedef unsigned char PixelVal, *PixelValPtr;
  33. typedef double    ScaledVal, *ScaledValPtr;
  34. typedef struct {
  35.     int            Version;                    /* Version of the External Module Library */
  36.     Boolean        Filter;                        /* If your function is a filter, TRUE */
  37.     int            NumOfImages;                /* The Number of Images you need in order to work. */
  38.     int            dummy1;                        /* Not Implemented. */
  39.     int            dummy2;                        /* Not Implemented. */
  40.     int            dummy3;                        /* Not Implemented. */
  41.     int            dummy4;                        /* Not Implemented. */
  42.     int            dummy5;                        /* Not Implemented. */
  43.     int            dummy6;                        /* Not Implemented. */
  44.     int            dummy7;                        /* Not Implemented. */
  45. } InitStruct;
  46.  
  47. /* Function Prototypes to Imagic */
  48.  
  49. /* Image Functions */
  50. pascal    ImageHandle    NewBlankImage(StringPtr, int, int, Boolean, Point*, Point*, short);
  51. pascal    ImageHandle    CopyImage(ImageHandle);
  52. pascal    Boolean        BeginImageWork(ImageHandle, Boolean);
  53. pascal    void        EndImageWork(ImageHandle);
  54. pascal    void        GetImageSize(ImageHandle, int*, int*);
  55. pascal    int            GetPixVal(ImageHandle, int, int);
  56. pascal    void        SetPixVal(ImageHandle, int, int, PixelVal);
  57. pascal    void        GetPixLineVal(ImageHandle, PixelValPtr*, int, int);
  58. pascal    void        SetPixLineVal(ImageHandle, PixelValPtr, int, int);
  59. pascal    void        PixToScaledVal(ImageHandle, PixelValPtr, ScaledValPtr*);
  60. pascal    void        ScaledValToPix(ImageHandle, ScaledValPtr, PixelValPtr*);
  61. pascal    ImageHandle    GetTopImage();
  62. pascal    StringPtr    GetImageName(ImageHandle);
  63. pascal    void        EraseImage(ImageHandle);
  64. pascal    void        DisposImage(ImageHandle);
  65. pascal    void        GetImageGeography(ImageHandle, Point*, Point*, short*);
  66. pascal    void        PixToLatLon(ImageHandle, int, int, double*, double*);
  67. pascal    void        LatLonToPix(ImageHandle, double, double, int*, int*);
  68. pascal    void        CopyCTable(ImageHandle, ImageHandle);
  69.     
  70. /* User Interface Functions. */
  71. pascal    Boolean        CreateProgressDialog(StringPtr, int);
  72. pascal    Boolean        UpdateProgressDialog(int);
  73. pascal    void        DisposProgressDialog();
  74. pascal    int            CreateDialog(StringPtr, StringPtr, StringPtr, StringPtr, Boolean);
  75. pascal    void        MessageDialog(StringPtr, Boolean);
  76. pascal    ImageHandle    **GetImageList(int, int, StringPtr, int*);
  77. pascal    int            GetVersion();
  78. pascal    Boolean        TextFilter(DialogPtr, EventRecord*, int*);
  79. pascal    void        PlaceWindow(WindowPtr, int, int);
  80. pascal    void        OutlineButton(DialogPtr, int);
  81.  
  82. /* Memory Functions */
  83. pascal    Handle        CreateNewHandle(Size);
  84. pascal    Ptr            CreateNewPtr(Size);
  85. pascal    void        DestroyHandle(Handle);
  86. pascal    void        DestroyPtr(Ptr);
  87.  
  88. /* XFunction Prototypes */
  89. pascal OSErr Initialize(InitStruct*);
  90. pascal OSErr ExecuteMenu();
  91. pascal OSErr Exit();
  92.  
  93. /* Projection Types
  94.  */
  95.  
  96. enum {
  97.     LINEAR = 1,
  98.     MERCATOR,
  99.     POLAR,
  100.     SPHERICAL,
  101.     QLSC,
  102.     CONIC,
  103.     LAMBERT,
  104.     ORTHOGRAPHIC,
  105.     EQUIDISTANT
  106. };
  107.